<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="common.jsp"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/backstyle/css/index.css" type="text/css" media="screen">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<script type="text/javascript">
	//打开初始化
	$(function(){
		setHeader();
		setMainBody();
	}); 
	//窗口改变时
	$(window).resize(function(){
		setHeader();
		setMainBody();
	});
		
	$(window).unload(function(){//页面关闭时清空session
	    if(event.clientX<0 && event.clientY<0){
	    	this.form.action="${pageContext.request.contextPath}/login.do?method=logout";
			this.form.submit();
	    }
	});
</script>

</head>
<body style="text-align: center;" scroll=no>
	<div id="header" style="display: block;">
		<div id="header_l" style="background-image:url('${pageContext.request.contextPath}/backstyle/img/main/index_t_01_01.png');float: left;background-repeat: no-repeat;height: 40px;width: 315px; padding-left:0px;padding-top:20px">
			<div style='margin-bottom: 0px; line-height: 2px; padding-top: 5px; margin-left: -2px; font-family: "Mv  Boli"; font-size: 19px; letter-spacing: 3px; font-weight: bold; color: #000000;'>河南易通投资有限公司</div>
			<div style='margin-bottom: 0px; margin-top: 11px; font-family: "Mv  Boli"; font-size: 15px; font-weight: bold; color: #000000;'>网站后台管理系统</div>
		</div>
		<div class="logo_r">
			<form name="form" method="post">
				<div class="logo_s">
					<div id="showsms" style="margin-left: -100px; float: left; width: 160px; height: 20px; margin-top: 6px;"></div>
					<div style="width: 70px; float: left;">
						<span id="messnum"></span>
					</div>
					<span class="logininfo">操作员:${user.name }[${user.userid }]</span> <span class="relogin" id="relogin" onclick="relogin();"> 重新登录</span> <span class="outlogin" id="closewin" onclick="closewin();">退出系统</span>
				</div>
			</form>
			<div class="logo_l"></div>
			<script type="text/javascript">
				//header 窗口大小设定
				function setHeader(){
					var width_logo_r = $('#header').width() - $('#header_l').width();
					$('div .logo_r').css('width',width_logo_r);
					var width_logo_s = width_logo_r - $('div .logo_l').width();
					$('div .logo_s').css('width',width_logo_s);
				}
			</script>
			<!-- 主导航 -->
			<div id="navmain">
				<div id="menu_0" class="navmain_aa"><a onclick="menuCssCtl('menu_0');openLeft('0','${pageContext.request.contextPath}/behind/index_left.jsp','0');" >首页</a></div>
                <div id="menu_1" class="manager_b"><a onclick="menuCssCtl('menu_1');openLeft('1','${pageContext.request.contextPath}/behind/index_left.jsp','1');" >用户信息</a></div>
                <div id="menu_2" class="manager_b"><a onclick="menuCssCtl('menu_2');openLeft('2','${pageContext.request.contextPath}/behind/index_left.jsp','2');" >前台模块</a></div>
                <div id="menu_3" class="manager_b"><a onclick="menuCssCtl('menu_3');openLeft('3','${pageContext.request.contextPath}/behind/index_left.jsp','3');" >客户信息</a></div>
                <div id="menu_4" class="manager_g"><a onclick="menuCssCtl('menu_4');openLeft('4','${pageContext.request.contextPath}/behind/index_left.jsp','4');" >文章管理</a></div>
				<div style="float: right;margin-right: 20px; height:5px; position: relative; top: 12px;">
					<img src="${pageContext.request.contextPath}/backstyle/img/main/arrow_up.gif" height="9" width="50" onclick="change_ud();">
				</div>
			</div>
			<!-- 主导航:end -->
		</div>
	</div>
	<div id="div_arrow_ud" style="width: 100%; height: 10px; display: none;" onmouseover="mouseover()" onmouseout="mouseout()">
		<div style="float: right;margin-right: 20px; height:5px; display: none; position: relative; top:10px;">
			<img src="${pageContext.request.contextPath}/backstyle/img/main/arrow_down.gif" height="9" width="50" onclick="change_ud();">
		</div>
	</div>
	<script type="text/javascript">
		var header_height = $('#header').height();
		var div_arrow_ud_height = 0;
		//上下点击隐藏与否
		function change_ud(){
			if($('#header').css('display')=='block'){
				$('#header').css('display','none');
				$('#div_arrow_ud').show();
				div_arrow_ud_height = $('#div_arrow_ud').height();
				var height_mainbody = $('#mainbody').height() + header_height - $('#div_arrow_ud').height();
				$('#mainbody').height(height_mainbody);
				height_mainbody = height_mainbody - $('#daohang').height();
				$('#mainFrame').height(height_mainbody);
				
			}else{
				$('#header').css('display','block');
				$('#div_arrow_ud').hide();
				$('#div_arrow_ud div').hide();
				var height_mainbody = $('#mainbody').height() + div_arrow_ud_height - header_height;
				$('#mainbody').height(height_mainbody);
				height_mainbody = height_mainbody - $('#daohang').height();
				$('#mainFrame').height(height_mainbody);
			}
		}
		function mouseover(){
			$('#div_arrow_ud div').show();
			$('#div_arrow_ud').height(30);
		}
		function mouseout(){
			$('#div_arrow_ud div').hide();
			$('#div_arrow_ud').height(10);
		}
	</script>
	<div id="mainbody">
		<div id="sidebar_l" style="display: block;">
			<div class="sidebar_top">
				<span id="time" name="time"></span>
			</div>
			<div class="sidebar_m">
				<IFRAME name="leftFrame" id="leftFrame" FRAMEBORDER=0 border="0" framespacing="0" SCROLLING=no SRC="behind/index_left.jsp" width="100%" height="100%"></IFRAME>
			</div>
		</div>
		<div id="sidebar_r">
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr><td width="5" valign="middle" id="td_arrow_lr">
						<img src="${pageContext.request.contextPath}/backstyle/img/main/arrow_left.gif" width="9" height="50" onclick="change_lr(this);">
					</td>
					<td>
						<div class="daohang" id="daohang">
							<div class="anniu-z_01"></div>
							<div id='position' class="anniu-z_022">首页</div>
							<div class="anniu-z_044"></div>
						</div>
						<div class="zhuti" id="lp" name="lp" >
							<div id="mainFramediv" style="display:block">
								<IFRAME name="mainFrame"  id="mainFrame" FRAMEBORDER=0 border="0" framespacing="0"	SCROLLING=yes SRC="behind/main.jsp"></IFRAME>
							</div>
						</div>
					</td></tr>
			</table>
		</div>
		<script type="text/javascript">
		var anniu_width = $('#daohang').find('.anniu-z_01').width() + $('#daohang').find('.anniu-z_044').width();
		//MainBody 显示窗口大小控制
		function setMainBody(){
			var height = document.documentElement.clientHeight-95;
			$('#mainbody').css('height',height);
			var width_main = $('#mainbody').width()-$('#sidebar_l').width();
			$('#sidebar_r').width(width_main);
			width_main = width_main - $('#td_arrow_lr').width();
			var width_position = width_main - anniu_width;
			$('#daohang').find('#position').width(width_position);
			$('#mainFrame').width(width_main).height($('#sidebar_r').height());
		}
		//左右点击隐藏与否
		function change_lr(obj_img){
			if($('#sidebar_l').css('display')=='block'){
				$(obj_img).attr('src','${pageContext.request.contextPath}/backstyle/img/main/arrow_right.gif');
				var width_main = $('#mainbody').width();
				$('#sidebar_r').width(width_main);
				width_main = width_main - $('#td_arrow_lr').width();
				$('#mainFrame').width(width_main);
				$('#daohang').find('#position').width(width_main - anniu_width);
				$('#sidebar_l').css('display','none');
			}else{
				$(obj_img).attr('src','${pageContext.request.contextPath}/backstyle/img/main/arrow_left.gif');
				setMainBody();
				$('#sidebar_l').css('display','block');
			}
		}
		</script>
	</div>
	<div id='footer' class="footbar" style="margin-top: 5px; margin-bottom: -1px; width: 100%">
		<div style="float: left; width: 150px; margin-left: 5px; margin-top: 10px" title="查看人员信息">
			<span id='showtlr' onclick='showinfo()' style="cursor: pointer;"></span>
		</div>
		<center>
			<div style="margin-top: 8px; font-family: Arial">
				<span>版权所有&copy 2006河南易通投资有限公司 </span>
			</div>
		</center>
	</div>
</body>
<script type="text/javascript">
	var oldId="menu_0";		
	//改变一级菜单样式		
	function menuCssCtl(Id){
		var elemId="#"+Id;
		if(oldId==Id){
			return;
		}			
		var oldelemId="#"+oldId;
		if($(elemId).hasClass("navmain_a")){
			$(elemId).attr("class","navmain_aa");
			changCss(oldelemId);
			oldId=Id;
			return;
		}
		if($(elemId).hasClass("manager_a")){
			$(elemId).attr("class","manager_aa");
			changCss(oldelemId);
			oldId=Id;
			return;
		}
		
		if($(elemId).hasClass("manager_g")){
			$(elemId).attr("class","manager_gg");
			changCss(oldelemId);
			oldId=Id;
			return;
		}
		if($(elemId).hasClass("navmain_g")){
			$(elemId).attr("class","navmain_gg");
			changCss(oldelemId);
			oldId=Id;
			return;
		}
		if($(elemId).hasClass("navmain_b")){
			$(elemId).attr("class","navmain_bb");
			changCss(oldelemId);
			oldId=Id;
			return;
		}	
		
		if($(elemId).hasClass("manager_b")){
			$(elemId).attr("class","manager_bb");
			changCss(oldelemId);
			oldId=Id;
			return;
		}	
		
		function changCss(elemId){
			if($(elemId).hasClass("navmain_aa")){
				$(elemId).removeClass('navmain_aa');
				$(elemId).addClass('navmain_a');
				return;			
			}
			if($(elemId).hasClass("manager_aa")){
				$(elemId).removeClass('manager_aa');
				$(elemId).addClass('manager_a');
				return;			
			}
			
			
			if($(elemId).hasClass("navmain_bb")){
				$(elemId).removeClass('navmain_bb');
				$(elemId).addClass('navmain_b');
				return;			
			}
				if($(elemId).hasClass("manager_bb")){
				$(elemId).removeClass('manager_bb');
				$(elemId).addClass('manager_b');
				return;			
			}
			
			
			if($(elemId).hasClass("navmain_gg")){
				$(elemId).removeClass('navmain_gg');
				$(elemId).addClass('navmain_g');
				return;			
			}
			
			if($(elemId).hasClass("manager_gg")){
				$(elemId).removeClass('manager_gg');
				$(elemId).addClass('manager_g');
				return;			
			}
		}	
	}

	function Test(){
// 		setTimeout('Test();', 1000);
// 		onlineUsersListService.onlineUserInfo(brno, ficode, function(data) {
// 			window.status='目前系统在线人数：'+data.length;
// 		});
	}

	function open_company(jspurl) {
		if (typeof (jspurl) == "undefined" || jspurl.length == 0) {
			jspurl = '${pageContext.request.contextPath}/behind/main.jsp';
		}
		window.open(jspurl, target = "mainFrame");

	}

	function openLeft(menuId,menuUrl,jspurl){
		if(menuId == '0'){//首页时候处理
			$('#position').html("首页");
			open_company("");
		}
 		menuUrl = menuUrl + "?menuId=" + menuId;
		window.open(menuUrl,target="leftFrame");
	}
	//系统推出
	function closewin(){
		jConfirm('<font color="#D7A728">你确定要<strong>退出</strong>系统？</font>', '系统提示', function(data) {
			if(data){
				window.top.close();
			}
		});
	}
	//重登陆
	function relogin() {
		$('form:first').attr("action","${pageContext.request.contextPath}/ykfk/relogin.do");
		$('form:first').submit();
	}
	//时间加载
	$(function(){
		setInterval(function(){ 
			with(new Date) 
			time.innerText = getFullYear()+"年"+(getMonth()+1)+"月"+getDate()+"日 星期"+"日一二三四五六".charAt(getDay())+" "+(getHours()>9?getHours():("0"+getHours()))+":"+(getMinutes()>9?getMinutes():("0"+getMinutes()))+":"+(getSeconds()>9?getSeconds():("0"+getSeconds()));
		},1000);  
	});
</script>
</html>
